package cn.diancan.action.manager;

import com.opensymphony.xwork2.ModelDriven;

import cn.diancan.action.BaseAction;
import cn.diancan.manager.security.ManagerAuth;
import cn.diancan.vo.manager.ScoreRecordManagerActionVo;
import cn.diancan.vo.other.Pager;


public class ScoreRecordAction extends BaseAction implements ModelDriven<ScoreRecordManagerActionVo>{
    
    private Pager pager = new Pager();
    private ScoreRecordManagerActionVo requestVo = new ScoreRecordManagerActionVo();
    
    
    //List
    @ManagerAuth
    public String scoreRecordListPage(){
	try {
	    pager.setPageNumber(requestVo.getPageNumber());
	    pager.setPageSize(10);
	    scoreRecordService.findScoreRecordPager(pager,requestVo.getCustomerName(),requestVo.getCustomerPhoneNum(),requestVo.getPurchaseSaleOutOrderNumber());
	    this.put("pager", pager);
	    this.put("requestVo", requestVo);

	    return freemarkView("/views/ftl/manager/score_record/score_record_list.ftl");
	} catch (Exception e) {
	    return managerError(e.getMessage());
	}
    }
    
    

    @Override
    public ScoreRecordManagerActionVo getModel() { 
	return requestVo;
    }
}
